from .relys import BitSet
from .relys import Chip

class LedSet(Chip):
    def __init__(self, width, led="<ledw>"):
        super().__init__(width, [0,width], [0,width])
        self.led = "{:" + led + "}"
    def __show__(self):
        print(self.led.format(self.pinOUT()))

@LedSet.keyframe(-1)
def _frame(chip):
    return chip